<style>
	#cxselect-example .form-group {
		margin: 10px 0;
	}
	[v-cloak] {display: none;}
	.wanl-specs .add-option{
		width: 250px;
		margin-bottom: 17px;
	}
	.wanl-specs .add-option .input-group-addon{
		color: #fff;
		background-color: #2c3e50;
	}
	.wanl-specs .panel .row{
		margin: 5px 0;
	}
	.wanl-specs .panel .remove {
		display: none;
		position: absolute;
		z-index: 2;
		width: 18px;
		height: 18px;
		font-size: 14px;
		line-height: 16px;
		color: #fff;
		text-align: center;
		cursor: pointer;
		background: rgba(0,0,0,.3);
		border-radius: 50%;
	}
	.wanl-specs .panel .panel-heading {
		position: relative;
	}
	.wanl-specs .panel .panel-heading .remove {
		right: 10px;
		top: 10px;
	}
	.wanl-specs .panel .panel-heading:hover .remove {
		display:block;
	}
	.wanl-specs .panel .wanl-specs-tag{
		background-color: #f8f8f8;
		position: relative;
		padding: 6px 10px;
		display: inline-block;
		margin-right: 10px;
		text-align: center;
		border-radius: 2px;
		cursor: pointer;
	}
	.wanl-specs .panel .wanl-specs-tag .remove {
		top: -5px;
		right: -5px;
	}
	.wanl-specs .panel .wanl-specs-tag:hover .remove{
		display:block;
	}

	.wanl-specs .batch .input-group{
		margin: 15px 0;
		width: 66%;
	}
	.sp_result_area{
		z-index: 10000;
	}
	.form-inline .form-control{
		padding-right: 100px;
	}
	.input-sm{
		padding: 5px 0;
		text-align: center;
	}
	.sp_container {
		margin-right: 3px;
	}
	.panel-intro > .panel-heading {
		position: sticky;
		top: 0;
		z-index: 9999;
	}
	.wanl-attribute {
		display: flex;
		flex-wrap: wrap;
		background: #f5f5f5;
		border: 1px solid #ddd;
		border-radius: 3px;
	}
	.wanl-attribute>div{
		width: 50%;
	}
</style>
<div class="panel panel-default panel-intro">
	<div class="panel-heading">
		<ul class="nav nav-tabs">
			<li class="active"><a href="#sale">销售信息</a></li>
			<li><a href="#wanlinfo">规则设置</a></li>
			<li><a href="#service">售后信息</a></li>
		</ul>
	</div>
	<div class="panel-body">
		<div id="myTabContent" class="tab-content">
			<div class="tab-pane fade active in" id="one">
				<div class="widget-body no-padding" id="cxselect-example">
					<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
						<div id="app" v-cloak>
							<!--<div class="row" id="basics">
								<div class="col-md-12">
									<div class="panel panel-default">
										<div class="panel-heading">基础信息</div>
										<div class="panel-body">
											<div class="form-group">
												<label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
												<div class="col-xs-12 col-sm-8">
													<input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" placeholder="请输入宝贝标题" value="{$row.title|htmlentities}">
												</div>
											</div>
											<div class="form-group">
												<label class="control-label col-xs-12 col-sm-2">{:__('Title_en')}:</label>
												<div class="col-xs-12 col-sm-8">
													<input id="c-title_en" data-rule="required" class="form-control" name="row[title_en]" type="text" placeholder="请输入宝贝英文标题" value="{$row.title_en|htmlentities}">
												</div>
											</div>

											<div class="form-group">
												<label class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
												<div class="col-xs-12 col-sm-8">
													<div class="form-inline">
														<select id="c-category_1" data-rule="required" v-model="categoryOne" class="form-control" @change="getCategory(1)">
															<option :value="key" v-for="(item,key) in categoryList" :key="item.id">{{item.name}}</option>
														</select>
														<select id="c-category_2" data-rule="required" v-if="categoryOne != null && categoryList[categoryOne].childlist.length != 0" v-model="categoryTwo" class="form-control" @change="getCategory()">
															<option :value="key" v-for="(item,key) in categoryList[categoryOne].childlist" :key="item.id">{{item.name}}</option>
														</select>
														<select id="c-category_3" data-rule="required" v-if="categoryTwo != null && categoryList[categoryOne].childlist[categoryTwo].childlist.length != 0" v-model="categoryThree" class="form-control" @change="getCategory()">
															<option :value="key" v-for="(item,key) in categoryList[categoryOne].childlist[categoryTwo].childlist" :key="item.id">{{item.name}}</option>
														</select>
														<select id="c-category_4" data-rule="required" v-if="categoryThree != null && categoryList[categoryOne].childlist[categoryTwo].childlist[categoryThree].childlist.length != 0" v-model="categoryFour" class="form-control" @change="getCategory()">
															<option :value="key" v-for="(item,key) in categoryList[categoryOne].childlist[categoryTwo].childlist[categoryThree].childlist" :key="item.id">{{item.name}}</option>
														</select>
														<select id="c-category_5" data-rule="required" v-if="categoryFour != null && categoryList[categoryOne].childlist[categoryTwo].childlist[categoryThree].childlist[categoryFour].childlist.length != 0" v-model="categoryFive" class="form-control" @change="getCategory()">
															<option :value="key" v-for="(item,key) in categoryList[categoryOne].childlist[categoryTwo].childlist[categoryThree].childlist[categoryFour].childlist" :key="item.id">{{item.name}}</option>
														</select>
														<input class="form-control" name="row[category_id]" type="hidden" :value="categoryId">
													</div>
												</div>
											</div>

											<div class="form-group">
												<label class="control-label col-xs-12 col-sm-2">{:__('宝贝品牌')}:</label>
												<div class="col-xs-12 col-sm-8">
													<div class="input-group">
														<input id="c-brand_id" data-rule="required"
															   data-source="wanlshop/brand/selectpage"
															   class="form-control selectpage"
															   name="row[brand_id]"
															   type="text" placeholder="点击选择宝贝品牌" value="{$row.brand_id|htmlentities}">
														<div class="input-group-addon no-border no-padding">
															<span><button type="button" class="btn btn-danger btn-brand">{:__('新建品牌')}</button></span>
														</div>
													</div>
												</div>
											</div>

											<div class="form-group" v-if="attributeData.length != 0">
												<label class="control-label col-xs-12 col-sm-2">{:__('类目属性')}:</label>
												<div class="col-xs-12 col-sm-8">
													<div class="wanl-attribute">
														<div class="form-group" v-for="(item,index) in attributeData" :key="index">
															<label for="inputPassword" class="col-sm-3 control-label">{{item.name}}</label>
															<div class="col-sm-9" v-if="attribute">
																<select :id="'c-attribute_' + item.name" :name="'row[attribute]['+item.name+']'" data-rule="required" class="form-control">
																	<option :value="data.name" v-for="(data,key) in item.value" :key="key" :selected="data.name == attribute[item.name]">{{data.name}}</option>
																</select>
															</div>
															<div class="col-sm-9" v-else>
																<select :id="'c-attribute_' + item.name" :name="'row[attribute]['+item.name+']'" data-rule="required" class="form-control">
																	<option :value="data.name" v-for="(data,key) in item.value" :key="key">{{data.name}}</option>
																</select>
															</div>
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>-->
							<div class="row" id="sale">
								<div class="col-md-12">
									<div class="panel panel-default">
										<div class="panel-heading">销售信息</div>
										<div class="panel-body">
											<div class="form-group">
												<label class="control-label col-xs-12 col-sm-2">{:__('商品规格')}:</label>
												<div class="col-xs-12 col-sm-8">
													<input type="hidden" name="row[specs]" value="{$row.specs}">
													<select class="form-control" disabled name="row[specs]" v-model="specs">
														<option value="single">单规格</option>
														<option value="multi">多规格</option>
													</select>
												</div>
											</div>
											<div class="form-group" v-if="specs=='single'">

												<div class="form-group">
													<label class="control-label col-xs-12 col-sm-2">{:__('建议零售价')}:</label>
													<div class="col-xs-12 col-sm-8">
														<input id="c-price" data-rule="required" readonly class="form-control" name="single[price]" type="number" step="0.01" placeholder="" value="{$goodsSku.price}">
													</div>
												</div>
												<div class="form-group">
													<label class="control-label col-xs-12 col-sm-2">{:__('供货价')}:</label>
													<div class="col-xs-12 col-sm-8">
														<input id="c-supply_price" data-rule="required" readonly class="form-control" name="single[supply_price]" type="number" step="0.01" placeholder="" value="{$goodsSku.supply_price}">
													</div>
												</div>
												{volist name="groupList" id="item"}
												<div class="form-group" >
													<label class="control-label col-xs-12 col-sm-2">{$item.name}价格:</label>
													<div class="col-xs-12 col-sm-8">
														<input id="c-group_price" data-rule="required" class="form-control" name="single[group_price][{$item.id}]" type="number" step="0.01" placeholder="" value="{$goodsSku['group_price'][$item.id]['price']}">
													</div>
												</div>
												{/volist}
												<!--<div class="form-group">
													<label class="control-label col-xs-12 col-sm-2">{:__('商品库存')}:</label>
													<div class="col-xs-12 col-sm-8">
														<input id="c-stock" data-rule="required" class="form-control" name="single[stock]" type="number" step="1" placeholder="" value="{$goodsSku.stock}">
													</div>
												</div>-->

												<div class="form-group">
													<label class="control-label col-xs-12 col-sm-2">商品重量:</label>
													<div class="col-xs-12 col-sm-8">
														<div class="input-group">
															<input id="c-weigh" class="form-control" readonly name="single[weigh]" type="number" value="{$goodsSku.weigh}">
															<span class="input-group-addon">KG</span>
														</div>
													</div>
												</div>
												<div class="form-group">
													<label class="control-label col-xs-12 col-sm-2">{:__('商品编码')}:</label>
													<div class="col-xs-12 col-sm-8">
														<input id="c-sn" data-rule="required" readonly class="form-control" name="single[sn]" type="text"  placeholder="" value="{$goodsSku.sn}">
													</div>
												</div>
											</div>
											<div class="form-group wanl-specs" v-else>
												<label class="control-label col-xs-12 col-sm-2"></label>
												<div class="col-xs-12 col-sm-8">
													<div>
														<div v-for="itemm in sku">
															<input type="hidden" name="row[sku][]" v-model="itemm" />
														</div>
														<input type="hidden" name="row[spu]" v-model="spu" />
														<div v-for="items in spuItem">
															<input type="hidden" name="row[spuItem][]" v-model="items" />
														</div>
													</div>
													<div class="row" v-show="sku.length">
														<div class="col-md-12">
															<table class="table table-bordered">
																<thead>
																<tr class="info text-info">
																	<th v-for="item in spu"> {{item}} </th>
																	<!--<th width="80">原价</th>-->
																	<th width="80">供货价</th>
																	<th width="80">零售价</th>

																	<th width="80" v-for="item in groupList">{{item.name}}价格</th>
																	<!--<th width="80">库存</th>-->
																	<th width="83">重量(Kg)</th>
																	<th width="80">编码</th>
																</tr>
																</thead>

																<tbody>
																<tr v-for="(item, index) in sku" :key="index">
																	<input type="hidden"  name="row[sort][]" class="input-sm form-control" :value="index">
																	<td v-for="(v, j) in item" :key="j">{{v}}</td>
																	<input type="hidden" data-rule="required" name="row[market_price][]" class="input-sm form-control wanl-market_price" :value="skuItem[sku[index]] && skuItem[sku[index]]['market_price']">
																	<td width="80"><input type="number" data-rule="required" readonly name="row[supply_price][]" class="input-sm form-control wanl-supply_price" :value="skuItem[sku[index]] && skuItem[sku[index]]['supply_price']"></td>
																	<td width="80"><input type="number" data-rule="required" name="row[price][]" class="input-sm form-control wanl-price" :value="skuItem[sku[index]] && skuItem[sku[index]]['price']"> </td>

																	<td width="80" v-for="groupPrice in groupList"><input type="number" data-rule="required" :class="['input-sm', 'form-control','wanl-group_price',`wanl-group_price_${groupPrice.id}`]" :data-group_id="groupPrice.id" :data-index="index" @change="onGroupVal" :value="skuItem[sku[index]] && skuItem[sku[index]]['group_price'][groupPrice.id]['price']"></td>
																	<input type="hidden" :class="['input-sm', 'form-control',`group_price_${index}`]" name="row[group_price][]">
																	<!--<td width="80"><input type="number" data-rule="required" name="row[stocks][]" class="input-sm form-control wanl-stock" :value="skuItem[sku[index]] && skuItem[sku[index]]['stock']"></td>-->
																	<td width="80"><input type="number" name="row[weigh][]" readonly class="input-sm form-control wanl-weigh" :value="skuItem[sku[index]] && skuItem[sku[index]]['weigh']"></td>
																	<td width="80"><input type="text" name="row[sn][]" readonly class="input-sm form-control wanl-sn" :value="skuItem[sku[index]] && skuItem[sku[index]]['sn']"></td>
																</tr>
																</tbody>
															</table>
															<div @click="skuBatch()">
																<span v-if="batch == 0">
																	是否要批量设置？
																</span>
																<span v-else>
																	取消批量设置？
																</span>
															</div>
														</div>
													</div>

													<div class="batch" v-show="batch == 1">

														<div class="input-group">
															<div class="input-group-addon">零售价 ￥</div>
															<input type="number" class="form-control" id="batch-price" placeholder="一键设置零售价">
															<div class="input-group-addon" onclick="batchSet('price')">批量设置</div>
														</div>

														<div class="input-group" v-for="groupPrice in groupList">
															<div class="input-group-addon">{{groupPrice.name}}价格 ￥</div>
															<input type="number" class="form-control"  :class="`batch-group_price_${groupPrice.id}`" placeholder="一键设置供货价格">
															<div class="input-group-addon" @click="batchSet(`group_price_${groupPrice.id}`)">批量设置</div>
														</div>
														<!--<div class="input-group">
															<div class="input-group-addon">库存</div>
															<input type="number" class="form-control" id="batch-stock" placeholder="一键设置库存">
															<div class="input-group-addon" onclick="batchSet('stock')">批量设置</div>
														</div>-->
													</div>

												</div>
											</div>

										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="row" id="wanlinfo">
							<div class="col-md-12">
								<div class="panel panel-default">
									<div class="panel-heading">规则设置</div>
									<div class="panel-body">

										<!-- 1.0.2升级优化 点击弹出图片上传，再次编辑商品异常 -->
										<div class="form-group">
											<label class="control-label col-xs-12 col-sm-2">{:__('店铺中分类')}:</label>
											<div class="col-xs-12 col-sm-8">
												<div class="input-group">
													<input id="c-shop_category_id" data-rule="required"
														   data-source="wanlshop/shopsort"
														   data-params='{"isTree":1,"custom[shop_id]":{$shop_id}}'
														   data-multiple="true"
														   data-pagination="true"
														   data-page-size="1"
														   class="form-control selectpage"
														   name="row[shop_category_id]"
														   type="text"
														   value="{$row.shop_category_id|htmlentities}">
													<div class="input-group-addon no-border no-padding">
														<span><button type="button" class="btn btn-danger btn-shopsort" >{:__('新建分类')}</button></span>
													</div>
												</div>
											</div>
										</div>
										<!--<div class="form-group">
											<label class="control-label col-xs-12 col-sm-2">{:__('Freight_id')}:</label>
											<div class="col-xs-12 col-sm-8">
												<div class="input-group">
													<input id="c-freight_id" data-rule="required" data-source="wanlshop/freight" class="form-control selectpage" name="row[freight_id]" type="text" value="{$row.freight_id|htmlentities}">
													<div class="input-group-addon no-border no-padding">
														<span><button type="button" class="btn btn-danger btn-freight" >{:__('新建模板')}</button></span>
													</div>
												</div>
											</div>
										</div>-->
									</div>
								</div>
							</div>
						</div>


						<div class="row" id="service">
							<div class="col-md-12">
								<div class="panel panel-default">
									<div class="panel-heading">宝贝状态</div>
									<div class="panel-body">
										<div class="form-group">
											<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
											<div class="col-xs-12 col-sm-8">
												<div class="radio">
													{foreach name="statusList" item="vo"}
													<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
													{/foreach}
												</div>
											</div>
										</div>

										<div class="form-group">
											<label class="control-label col-xs-12 col-sm-2">{:__('是否热销')}:</label>
											<div class="col-xs-12 col-sm-8">
												<div class="radio">
													{foreach name="hotList" item="vo"}
													<label for="row[hot]-{$key}"><input id="row[hot]-{$key}" name="row[hot]" type="radio" value="{$key}" {in name="key" value="$row.hot"}checked{/in} /> {$vo}</label>
													{/foreach}
												</div>
											</div>
										</div>



<!--										 <div class="form-group">-->
<!--										    <label class="control-label col-xs-12 col-sm-2">{:__('Flag')}:</label>-->
<!--										    <div class="col-xs-12 col-sm-8">-->
<!--										                    -->
<!--										        <select  id="c-flag" data-rule="required" class="form-control selectpicker" multiple="" name="row[flag][]">-->
<!--										            {foreach name="flagList" item="vo"}-->
<!--										                <option value="{$key}" {in name="key" value="$row.flag"}selected{/in}>{$vo}</option>-->
<!--										            {/foreach}-->
<!--										        </select>-->
<!--										-->
<!--										    </div>-->
<!--										</div>-->
										<!--
                                       <div class="form-group">
                                           <label class="control-label col-xs-12 col-sm-2">{:__('Distribution')}:</label>
                                           <div class="col-xs-12 col-sm-8">

                                               <select  id="c-distribution" data-rule="required" class="form-control selectpicker" name="row[distribution]">
                                                   {foreach name="distributionList" item="vo"}
                                                       <option value="{$key}" {in name="key" value="$row.distribution"}selected{/in}>{$vo}</option>
                                                   {/foreach}
                                               </select>

                                           </div>
                                       </div> -->
									</div>
								</div>
							</div>
						</div>
						<div class="form-group layer-footer">
							<div class="col-xs-12 col-sm-8">
								<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
								<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>



	
    
	
    

	
	
	
	
	
	
 
 
 
 
 
 
 
 
 
 
 
	
	
